<?php
/**
 * Name: AdminRoleModel.class.php
 * Description:
 * User: DIY
 * Date: 2016/9/8
 * Time: 9:13
 */

namespace Common\Model;

use Think\Model;

class AdminRoleModel extends Model
{
    //自动完成
    protected $_auto = array (
        array('add_time','time',1,'function') ,
        array('add_ip','get_client_ip',1,'function'),
        array('up_time','time',3,'function'),//新增 和 编辑
        array('up_ip','get_client_ip',3,'function'),//新增 和 编辑
        array('rules','get_rules',2,'callback'),
    );
    //处理字符
    public function get_rules($rules){
       return  substr($rules,0,strlen($rules)-1);
    }


}